﻿using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using WalkingTec.Mvvm.Core;
using System.Text.Json.Serialization;
using Digitalmes.Model;
using Digitalmes.Model.WmsManagement;

namespace Digitalmes.Model.WmsManagement
{
    /// <summary>
    /// 盘点表单
    /// </summary>
	[Table("StoretakeSheet")]

    [Display(Name = "_Model.StoretakeSheet")]
    public class StoretakeSheet : BasePoco,IPersistPoco,ITenant, IWorkflow
    {
        [Key]
        [Display(Name = "_Model._StoretakeSheet._ID")]
        [Required(ErrorMessage = "Validate.{0}required")]
        public new long ID { get; set; }
        [Display(Name = "_Model._StoretakeSheet._Code")]
        [Comment("盘点单号")]
        [Required(ErrorMessage = "Validate.{0}required")]
        public string Code { get; set; }
        [Display(Name = "_Model._StoretakeSheet._Desc")]
        [Comment("盘点说明")]
        public string Desc { get; set; }
        [Display(Name = "_Model._StoretakeSheet._StoretakeDate")]
        [Comment("盘点时间")]
        public string StoretakeDate { get; set; }
        [Display(Name = "_Model._StoretakeSheet._Status")]
        [Comment("状态")]
        public FormStatusEnum? Status { get; set; }
        [Display(Name = "_Model._Storetake._Sheet")]
        [InverseProperty("Sheet")]
        public List<Storetake> Storetake_Sheet { get; set; }
        [Display(Name = "_Model._StoretakeSheet._IsValid")]
        [Comment("是否有效")]
        [Required(ErrorMessage = "Validate.{0}required")]
        public bool IsValid { get; set; } = true;
        [StringLength(50, ErrorMessage = "Validate.{0}stringmax{1}")]
        public string TenantCode { get; set; }

	}

}
